You can search for a file in your local and remote sites from the Document window or the Site window. To display the Site window, choose Window > Site Files.
You can also search the current document, selected files, a directory, or an entire site for text, text surrounded by specific tags, or HTML tags and attributes. Note that you use different commands to search for files and to search for text (and/or HTML) within files: Locate in Local Site and Locate in Remote Site search for files, while Edit > Find and Edit > Replace search for text and tags within files.
Note: If you select Site > Locate in Local Site or Site > Locate in Remote Site while the Document window is active, and if the current file is not part of the currently open site, Dreamweaver attempts to determine which of your locally defined sites the current file belongs to; if the current file belongs to only one local site, Dreamweaver opens that site and then locates the file in it.
To find a file in your local site:
1 | Select the file in the Remote pane of the Site window or open the file in a Document window. |
2 | Choose Site > Locate in Local Site. (On Windows only, if the Site window is active, choose Edit > Locate in Local Site.) |
The file is highlighted in the Local pane of the Site window. | |
![]() |
To find a file in your remote site:
1 | Select the file in the Local pane of the Site window or open the file in a Document window. |
2 | Choose Site > Locate in Remote Site. (On Windows only, if the Site window is active, choose Edit > Locate in Remote Site.) |
The file is highlighted in the Remote pane of the Site window. | |
![]() |
To search for text and/or HTML within documents:
1 | Choose from the following options: |
![]() |
From the Document or Site window, choose Edit > Find or Edit > Replace. |
![]() |
From the HTML Source inspector, right-click (Windows) or Control-click (Macintosh) and choose Find or Replace from the context menu. |
2 | In the Find or Replace dialog box that appears, use the Find In option to specify which files to search: |
![]() |
Choosing Current Document confines the search to the active document. This option is available only when you choose Find or Replace with the Document window active, or from the context menu in the HTML Source inspector. |
![]() |
Choosing Selected Files confines the search to the files and folders that are currently selected in the Site window. This option is available only when you choose Find or Replace with the Site window active (that is, in front of the Document window). |
![]() |
Choosing Current Site expands the search to all the HTML documents, library files, and text documents in the current site. After you choose Current Site, the name of the current site appears to the right of the pop-up menu. If this is not the site you want to search, choose a different site from the current sites pop-up menu in the Site window. |
![]() |
Choosing Folder confines the search to a specific group of files. After choosing Folder, click the folder icon to browse to and select the directory you want to search. |
3 | Use the Find What option to specify the kind of search you want to perform. |
![]() |
Choosing Text lets you search for specific text strings in the Document window. A text search ignores any HTML that interrupts the string. For example, a search for the black dog would match both the black dog and the <i>black</i> dog . |
![]() |
Choosing HTML Source lets you search for specific text strings in the HTML source code. See About HTML source searches. |
![]() |
Choosing Text (Advanced) lets you search for specific text strings that are either within or not within a tag or tags. For example, in a document that contains the following HTML, searching for tries not inside i would find only the second instance of the word tries : John <i>tries</i> to get his work done on time, but he doesn't always succeed. He tries very hard. See Searching for text between specific tags. |
![]() |
Choosing Tag lets you search for specific tags, attributes, and attribute values, such as all TD tags with VALIGN set to TOP . See Searching for HTML tags and attributes. |
Note: Pressing Control+Enter or Shift+Enter (Windows), or Control+Return, Shift+Return, or Command+Return (Macintosh), adds line breaks within the search fields, allowing you to search for a Return character. Be sure to deselect the Ignore Whitespace Differences option when performing this search, if you're not using regular expressions. Note that this finds a particular character, not the general notion of a line break; for instance, it doesn't find a <br> tag or a <p> tag. Return characters appear as spaces in the Document window, not as line breaks. |
|
4 | Use the following options to expand or limit the search: |
![]() |
The Match Case option, when selected, limits the search to text that matches the case of the text you want to find. For example, if you search for the brown derby, you will not find The Brown Derby . |
![]() |
Note: The Ignore Whitespace Differences option, when selected, treats all whitespace as a single space for the purposes of matching. For example, with this option selected, this text
would match this text
but not thistext
. This option is not available when the Use Regular Expressions option is selected; you must explicitly write your regular expression to ignore whitespace. Note that <p>
and <br>
tags do not count as whitespace.
![]() |
The Use Regular Expressions option causes certain characters and short strings (such as ?, *, \w, and \b) in your search string to be interpreted as regular expression operators. For example, a search for the b\w*\b dog will match both the black dog and the barking dog . See About regular expressions. |